package com.mall.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mall.mapper.PrefrenceAreaMapper;
import com.mall.model.domain.CmsPrefrenceArea;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PrefrenceAreaService {
    @Autowired
    private PrefrenceAreaMapper prefrenceAreaMapper;


    /**
     * 获取所有商品优选
     *
     * @return
     */
    public List<CmsPrefrenceArea> queryGoodAllProduct() {
        //构建查询商品优选的queryWrapper
        LambdaQueryWrapper<CmsPrefrenceArea> queryWrapper = new LambdaQueryWrapper<>();
        //调用prefrenceAreaMapper查询  并返回数据
        return prefrenceAreaMapper.selectList(queryWrapper);
    }
}
